﻿<!DOCTYPE HTML>
<html>
<body>
    <canvas id="myCanvas" width="200" height="100">
    </canvas>
    <script type="text/javascript">
        //  1.用canvas绘制一枚铜钱（外圆内方）
        var cxt = document.getElementById("myCanvas").getContext("2d");
        cxt.fillStyle = "#FF0000";
        cxt.beginPath();
        cxt.arc(90, 40, 40, 0, Math.PI * 2, true);
        cxt.closePath();
        cxt.fill();
        cxt.fillStyle = '#FFFF00';
        cxt.fillRect(70, 25, 35, 35);
    </script>

</body>
</html>
